//
//  AnalysisCountryList.m
//  TravelWorld
//
//  Created by dllo on 15/5/22.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "AnalysisCountryList.h"

@implementation AnalysisCountryList
+ (NSMutableArray *)AnalysisContinentList:(NSDictionary *)dic{
    NSMutableArray *result = [NSMutableArray array];
    NSArray *continents = [dic objectForKey:@"continents"];
    for (NSDictionary *continent in continents) {
        ContinentModel *model = [ContinentModel getModel];
        model.countrys = [continent objectForKey:@"countrys"];
        model.ID = [continent objectForKey:@"id"];
        model.name = [continent objectForKey:@"name"];
        model.name_cn = [continent objectForKey:@"name_cn"];
        [result addObject:model];
    }
    return result;
}
+ (NSMutableArray *)AnalysisCountryList:(NSArray *)arr{
    NSMutableArray *result = [NSMutableArray array];
    for (NSDictionary *country in arr) {
        CountryModel *model = [CountryModel getModel];
        model.continentId = [country objectForKey:@"continentId"];
        model.cover = [country objectForKey:@"cover"];
        model.ID = [country objectForKey:@"id"];
        model.name = [country objectForKey:@"name"];
        model.name_cn = [country objectForKey:@"name_cn"];
        [result addObject:model];
    }
    return result;
}
@end
